#include <cstring>
#include "..\inc\KMP.h"
#include <iostream>
#include <string>

int main()
{
	char* src = "John Test OK! afafatagbmecefaae";
	char* pat = "cefa";
	size_t lenSrc = strlen(src);
	size_t lenPat = strlen(pat);
	const char* result = mp_search(src, lenSrc, pat, lenPat);
	std::string resultStr(result);
	if (result)
		std::cout << resultStr << "\n";
	else
		std::cout << "Fail to find the pat" << "\n";
}